package com.freedom.admin.api.feign;

import com.freedom.admin.api.pojo.dto.UserAuthDTO;
import com.freedom.admin.api.feign.fallback.UserFeignFallbackFactory;
import com.freedom.common.core.result.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "freedom-admin", fallback = UserFeignFallbackFactory.class, path = "/feign/user")
public interface UserFeign {

    @GetMapping("/find/{username}")
    CommonResult<UserAuthDTO> findUserByUsername(@PathVariable String username);
}
